package com.kaifamiao.jdbc;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class JdbcTest06 {

    public static void main(String[] args) throws SQLException {

        DbHelper dh = new DbHelper();
        dh.load();
        Connection c = dh.connect();
        Statement st = c.createStatement();
        ResultSet rs = st.executeQuery( "SELECT empno , ename , job , sal FROM emp" );

        // 调用 DbHelper 中的 process 方法处理整个结果集(初级阶段主要是输出结果集)
        dh.process( rs );

        dh.release( rs );
        dh.release( st );
        dh.release( c );

    }

}
